import { createRouter, createWebHistory } from 'vue-router'
import Layout from '@/views/Layout/Index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'Login',
      component: () => import('@/components/Login.vue')
    },
    {
      path: '/',
      component: Layout,
      children: [
        {
          path: 'user',
          component: () => import('@/views/user/Index.vue'),
          meta: { title: '用户管理' }
        },
        {
          path: 'notice',
          component: () => import('@/views/notice/Index.vue'),
          meta: { title: '公告管理' }
        },
        {
          path:'resume',
          component: () => import('@/views/resume/Index.vue'),
          meta: { title: '简历模板管理' }
        },
        {
          path:'huanying',
          component: () => import('@/views/huanying/huanying.vue'),
          meta: { title: '欢迎页' }
        },
        {
          path:'resumeManage',
          component: () => import('@/views/resume/resume.vue'),
          meta: { title: '简历管理' }
        },
        {
          path:'grade',
          component: () => import('@/views/grade/Index.vue'),
          meta: { title: '成绩管理' }
        },
        {
          path:'position',
          component: () => import('@/views/position/Index.vue'),
          meta: { title: '岗位管理' }
        }
      ]
    }
  ],
})

export default router
